/*
 * Block.cpp
 *
 *  Created on: 25/03/2013
 *      Author: root
 */

#include "../headers/Block.h"

Block::Block() {
  // TODO build a constructor method.
}

Block::~Block() {
  // TODO build destructor method.
}

// -- Getters methods.

std::string Block::getFunction(){
  return this->cell.function;
}

float Block::getValue() {
  return this->cell.value;
}
short int Block::getType() {
  return this->cell.type;
}
//Parameter getParameter();

std::string Block::getChildBlock(int i) {
  return this->childBlocks.at(i);
}
std::string Block::getTitle() {
  return this->cell.title;
}

// -- Setter methods develop.

/*
 * Set a title to a cell.
 */

void Block::setFunction(std::string function) {
  this->cell.function = function;
}

void Block::setTitle(std::string title) {
  this->cell.title = title;
}

/*
 * Set a type to a cell.
 */
void Block::setType(int type) {
  this->cell.type = type;
}

void Block::setValue(float value) {
  this->cell.value = value;
}

/*
 * Set Parameter to a block.
 */
void Block::setParameter(Block &a, float b) {
  // TODO set Parameter
}

/*
 * Set a group of child of the block.
 */
void Block::setChildBlocks(string child) {
  this->childBlocks.push_back(child);
}
